using System;
using RomanJendrusz.Amazon.ETL.Infrastructure.Loging.Core;

namespace RomanJendrusz.Amazon.ETL.Infrastructure.Loging.Core
{
    internal class NullObjectLog : ILog
    {
        private string logNotInitializedMsg = "The LogGateway was not initialized";
        private static bool _msgDisplayed;

        #region ILog Members

        public void Debug(string message)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Debug(object objectToBeLogged)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Debug(string message, object objectToBeLogged)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Debug(string message, Exception exceptionToBeLoggged)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Warn(string message)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Warn(object objectToBeLogged)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Warn(string message, object objectToBeLogged)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Warn(string message, Exception exceptionToBeLoggged)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Error(string message)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Error(object objectToBeLogged)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Error(string message, object objectToBeLogged)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public void Error(string message, Exception ex)
        {
            if (_msgDisplayed) return;
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
        }

        public Guid ErrorWithIdentifier(string message)
        {
            if (_msgDisplayed) return default(Guid);
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
            return default(Guid);
        }

        public Guid ErrorWithIdentifier(object objectToBeLogged)
        {
            if (_msgDisplayed) return default(Guid);
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
            return default(Guid);
        }

        public Guid ErrorWithIdentifier(string message, object objectToBeLogged)
        {
            if (_msgDisplayed) return default(Guid);
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
            return default(Guid);
        }

        public Guid ErrorWithIdentifier(string message, Exception exceptionToBeLoggged)
        {
            if (_msgDisplayed) return default(Guid);
            System.Diagnostics.Debug.Write(logNotInitializedMsg);
            _msgDisplayed = true;
            return default(Guid);
        }

        #endregion
    }
}